import React from 'react'
import { LISTITEM } from '../types/store.d'

interface MYPROPSP {
    list: LISTITEM;
    handleClick: (item: LISTITEM) => void
}
function Item(props: MYPROPSP) {
    const { list } = props
    return (
        <div  onClick={() => props.handleClick(list)}>
            <h4>{list.title}</h4>
        
            <img  src={list.img} alt="" />
      
        </div>
    )
}
export default Item